<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2017/5/15
  Time: 17:31
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<html>
<head>
    <title>申请编辑</title>
    <script type="application/javascript">
        <%--alert("extendObjectList:"+"${templetBase}");--%>
        function returnMain() {
            window.location.href="${pageContext.request.contextPath}/XzTempletBaseInfo/choiceBaseTemplet.emp";
        }
        function tj() {
            var applicantTimeStr=document.getElementById("applicantTimeStr").value;
            if(applicantTimeStr == null || applicantTimeStr == ""){
                alert("申请时间不能为空");
            }else {
                var templetBaseInfo=document.getElementById("templetBaseInfo");
                templetBaseInfo.submit();

            }
        }
        
    </script>
</head>
<body>
<!--头部开始-->
<jsp:include page="headerBack.jsp"/>
<!-- 导航 -->
<jsp:include page="leftBack.jsp"/>
<!--内容页-->
<div class="main">

    <!--内容页头部-->
    <div class="page-header">
        <div class="pull-left">
            <ol class="breadcrumb visible-sm visible-md visible-lg">
                <li><a href="two.html"><i class="icon fa fa-home"></i>主页</a></li>
                <li class="active"><i class="fa fa-pencil"></i>基本信息</li>
            </ol>
        </div>
        <div class="pull-right">
            <h2>主页</h2>
        </div>
    </div>
    <form action="${pageContext.request.contextPath}/XzTempletBaseInfo/saveEmpletBaseInfo.emp" class="search1"
          method="post" id="templetBaseInfo" name="templetBaseInfo">


        <div style="border:1px solid darkgray;border-radius: 3px">
            <div style="margin: 0 auto;text-align:center;">
                <input type="hidden" name="templetName" value="${templetBase.templetName}"/>
                <h2>${templetBase.templetName}</h2>
            </div>

            <div style="margin-top: 40px">
                <input type="hidden" name="templetBaseId" value="${templetBase.templetBaseId}"/>
                <div class="col-md-3"></div>
                <div class="col-md-3">申请人:
                    <input type="text"  style="width: 150px" readonly="readonly" value="${userLogin.empName}"/>
                </div>
                <div class="col-md-3">申请时间：
                    <input style="width: 150px" class="sang_Calender" id="applicantTimeStr" name="applicantTimeStr" type="text" value="">
                </div>
                <div class="col-md-3"></div>
                <div>
                    <hr style="width: 90%;size: 5px"/>

                    <input type="hidden" name="extendObjectList" value="${templetBase.extendObjectList}">


                    <c:forEach var="extendObject" items="${templetBase.extendObjectList}" varStatus="status">
                        <div class="col-md-3">
                        <label>${extendObject.extendType}</label>
                            <input type="hidden" name="extendInfoObjectList[${status.index}].templetExtendId" value="${extendObject.templetExtendId}"/>
                            <input type="text" name="extendInfoObjectList[${status.index}].extendValue" style="width: 150px">
                        </div>
                    </c:forEach>
                    <input type="hidden" name="extendValueList" id="extendValueList"/>

                </div>
                <div style="margin: 0 auto;margin-top: 120px;text-align: center">
                <%--<input type="submit"  value="提交" />--%>
                    <button onclick="tj()"  class="three btn btn-primary" style="width: 100px" type="button">提交</button>
                    <input type="button" onclick="returnMain()" class="three btn btn-primary" style="width: 100px"  value="返回">
                </div>
            </div>
        </div>
    </form>
</div>
<script type="text/javascript" src="${pageContext.request.contextPath}/dist/backEnd/js/datetime.js"></script>
</body>
</html>
